<!DOCTYPE html>
<html lang="en">
<head>
        <?php include_once VIEWS.'/inc/head.php'; ?>

</head>
<body>
 <div class="box"></div>

    <?php include_once VIEWS.'/inc/header.php'; ?>
    <!--头部导航-->
     <?php include_once VIEWS.'/inc/nav.php'; ?>
     <!--分隔-->
  <div class="wrap clear">
       
    
        <!--banner大图-->
    
        <div class="about clear">
            <div class="news">
            <?php if(!empty($fenye['new_con'])):?>
						<?php foreach($fenye['new_con'] as $k=>$v):?>
                <a href="<?php echo site_url('news/info/'.$v['id']); ?>">
                    <dl>
                        <dt><img src="<?php echo upload_file(str_replace("thumbnail/","",$v['thumb']));?>" alt=""></dt>
                        <dd>
                            <p><?php echo date('Y / m / d',$v['timeline']);?></p>
                            <span><?php echo $v['title'];?></span>
                            <i><?php echo msubstr(str_replace('&nbsp;','',trim(strip_tags($v['content']))),0,90);?></i>
                        </dd>
                    </dl>
                </a>
            <?php endforeach;?>
						<?php endif;?>
            </div>

            <div class="load"></div>

        </div>
         
      <!--分隔-->

  </div>





 
    <!--商业区域-->


 <script>
     $(function(){
    	 var load="<?php echo site_url('news/news_ajax');?>";
         var p = 1;
          $(window).scroll(function(){
	       		if ($(document).height() - $(this).scrollTop() - $(this).height()<1){
	       				$.ajax({
	                url:load,
	                data:{page:p+1},
	                cache: false,
	                dataType:'json',
	                success: function(data){
	                    console.log(data.status);
	              	  	if(data.status=='yes'){
	                        p=p+1;
	                       }else{
	                    	   $(window).off("scroll");
	                    	   $(".load").hide();
	                       }
	                	  console.log(data.list);
	                	  $(".news").append(data.list);
	                }
	              });
	         }
 				 });



          
     })
 </script>

</body>
</html>

